<?php
    $city = array();
    $c = $o = 0;
    foreach ($models as $item) {
        if ($item->is_reg_center) {
            $city['center'][$c][] = $item;

            $c++;
            if ($c % 5 == 0) {
                $c = 0;
            }
        } else {
            $city['other'][$o][] = $item;

            $o++;
            if ($o % 5 == 0) {
                $o = 0;
            }
        }
    }
?>

<div class="partners" style="padding-top: 20px; ">
    
    <div class="content">
        
        <div class="row ">
            <?php foreach ($city['center'] as $k => $items) { ?>
                <?php foreach ($items as $item) { ?>
                <div class="span2">
                        <a href="<?= $item->url; ?>">
                            <?php echo $item->name ; ?>
                        </a>
                </div>
            <?php } ?>
            <?php } ?>
        </div>
        
<?php /*
        <div class="row cityOther" style=" padding-bottom: 30px;">
            <?php foreach ($city['other'] as $k => $items) { ?>
                <div class="span2">
                    <?php foreach ($items as $item) { ?>
                        <a href="http://logopond.com/gallery/detail/192115">
                            <?php echo $item->name . "<br />"; ?>
                        </a>
                    <?php } ?>
                </div>
            <?php } ?>
        </div>
*/ ?>
        
    </div><!-- /.content -->
</div><!-- /.partners-->